<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href=/asdf.png>
    <script src="./xx.js"></script>
    <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
    <!-- <link rel="stylesheet" href="<%= BASE_URL %>/css/xxx/xx.css"> -->
    <script>
      // window.addEventListener('unhandledrejection', event => {
      //   event.promise.catch((e)=>{
      //   if (e instanceof Error) {
      //     console.log('vue app get error:', event); // 捕获后自定义处理
      //     throw e;
      //   }else {
      //     console.log(e);
      //   }
      // })
      //   console.log('vue app get error:', event);
      // }, true);
      // window.addEventListener('error', event => {
      //   console.log('vue app get error:', event); // 捕获后自定义处理
      // }, true);
    </script>
    <!-- <script type="module">
      import a from 'http://localhost:9090/module.js';
    </script> -->
    <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
  </head>
  <script>
    // console.log(document.getElementById('subVue'), document.head, 'document.head');
  </script>
  <script>
    window.addEventListener('error',function (...args) {
      console.log('subApp: normal error',args)
    });

    window.addEventListener('unhandledrejection',function (...args) {
      console.log('subApp: unhandledrejection error',args);
    });
  </script>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- <script>
      throw Error('normal err');
    </script> -->
    <script>
      // setTimeout(()=>{
      //   throw Error('subApp unhandledrejection error');
      // })
    </script>
    <!-- built files will be auto injected -->
    <!-- <img src="xxx" />
    <video src="1xxx" ></video> -->
    <!-- <div>
      <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
        <g fill="none" fill-rule="evenodd">
            <path d="M0 0H20V20H0z"/>
            <path fill="currentColor" d="M10 .833c5.063 0 9.167 4.104 9.167 9.167S15.063 19.167 10 19.167.833 15.063.833 10 4.937.833 10 .833zM10 2.5c-4.142 0-7.5 3.358-7.5 7.5 0 4.142 3.358 7.5 7.5 7.5 4.142 0 7.5-3.358 7.5-7.5 0-4.142-3.358-7.5-7.5-7.5zM8.14 5.69l1.768 1.768 1.767-1.768c.163-.162.427-.162.59 0l.589.59c.163.162.163.426 0 .589l-2.068 2.067h2.13c.23 0 .417.187.417.417v.833c0 .23-.186.417-.416.417h-2.084v1.064h2.084c.23 0 .416.186.416.416v.834c0 .23-.186.416-.416.416h-2.084v1.25c0 .23-.186.417-.416.417h-.834c-.23 0-.416-.187-.416-.417v-1.25H7.083c-.23 0-.416-.186-.416-.416v-.834c0-.23.186-.416.416-.416h2.084v-1.064H7.083c-.23 0-.416-.187-.416-.417v-.833c0-.23.186-.417.416-.417h1.945l-.004-.005L6.96 6.87c-.162-.163-.162-.427 0-.59l.59-.589c.162-.162.426-.162.589 0z"/>
        </g>
      </svg>
    </div> -->
  </body>
  <script>
    // console.log('test', document.currentScript);
    // setTimeout(() => {
    //   console.log('test2', document.currentScript);
    // })
    // b = 2;
    // window.onload = function(e) {
    //   console.log('onload', e);
    // }
  //   window.onerror = function (...args) {
  //   console.log('vue app get error：', ...args);
  // }
  </script>
  <!-- <script src="<%= BASE_URL %>xxxasync.js" async></script> -->
</html>
